using UnityEngine;
using System.Collections;

public class Quad 
{
	public static Mesh Create(float width , float height)
	{
		Mesh mesh = new Mesh ();
		mesh.name = "Quadrado";
		
		mesh.vertices = new Vector3 []
		{
			new Vector3(-width, height,0),	
			new Vector3(width,height,0),
			new Vector3(width,-height,0),
			new Vector3(-width,-height,0)
		};
		
		
		mesh.uv = new Vector2 []
		{
			Vector2.up,
			Vector2.one,
			Vector2.right,
			Vector2.zero
			
		};
		
		mesh.triangles = new int []
		{
			0,1,2,
			0,2,3
		};
		
		return mesh;
	}
	
	
}
